package com.decoration.basic.util;

import java.util.Arrays;
import java.util.List;

/**
 * 公共数据类
 *
 * @author Chack
 */
public class Global {

	/**
	 * 全局变量
	 */

	/**
	 * 用户 session 保存键
	 */
	public static final String SESSION_LOGIN_KEY = "login_key";

	public static final String SESSION_USER_ID = "user_id";

	public static final String SESSION_USER_NAME = "user_name";

	public static final String SESSION_USER_ACCOUNT = "user_account";

	public static final String SESSION_USER_TYPE = "user_type";

	public static final String UNIFIED_ORDER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";
	/**
	 * 无需拦截的控制器集合
	 */
	public static final List<String> ALLOW_ACTIONS = Arrays.asList("/admin/login", "/admin/doLogin");

	/**
	 * 用户类别
	 */
	public static final int USER_MANAGER = 0;// 管理员
	public static final int USER_MASTER = 1;// 师傅
	public static final int USER_SUPERVISOR = 2;// 监理
	public static final int USER_OWNER = 3;// 业主
	public static final int USER_STYLIST = 4;// 设计师
	public static final int USER_TOURIST = 5;// 游客

	/**
	 * 提现状态
	 */
	public static final Integer RECHARGE_WAIT = 1;// 待处理
	public static final Integer RECHARGE_SUCCESS = 2;// 成功
	public static final Integer RECHARGE_FAILED = 3;// 拒绝
	public static final Integer RECHARGE_MIN_AMOUNT = 100;// 提现最小金额

	/**
	 * 管理员菜单权限
	 */
	static final Integer[] ADMIN_MENU = { 1, 2, 3, 4, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
			24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35 };

	/**
	 * 渠道业务员菜单权限
	 */
	static final Integer[] CHANNEL_MENU = { 7, 17, 18, 28, 30, 34 };

	/**
	 * api调用签名校验数据
	 */
//	public static final String PICTURE_UPLOAD_DIR = "/home/ap/dctd/upload";
	public static final String PICTURE_UPLOAD_DIR = "/home/dctd/upload";
	public static final String PICTURE_DOWNLOAD_URL = "/upload";
}